@import "public.less";

@path-url: "http://www.blog.com/images";
ul {
  li {
    list-style: none;
  }
}

/*chat*/
#setting-box{
  //TODO:
  position: fixed;
  width: 860px;
  height: 640px;
  z-index: -1;
  .position-center(@top: 87px;@bottom: auto);
  .room-setting{
    position: absolute;
    right: 0px;
    width: 250px;
    height: 640px;
    border: 1px solid #ddd;
    border-left: none;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    background-color: #f5f5f5;
    box-sizing: border-box;
    padding: 18px;
    .search{
      input{
        width: 100%;
      }
      margin-bottom: 12px;
    }
    .room-users{
      li{
        float: left;
        width: 42px;
        box-sizing: content-box;
        margin-right: 15px;
        margin-bottom: 6px;
        &.add,&.delete{
          div{
            width: 32px;
            height: 32px;
            margin:  0 auto;
            border: 1px solid #e5e5e5;
            text-align: center;
            line-height: 32px;
            font-size: 26px;
            color: #959a9a;
            font-weight: lighter;
            &:hover{
              border: 1px solid #dcdcdc;
              cursor: pointer;
              color: #000;
            }
          }
        }
        &:nth-of-type(4n){
          margin-right: 0;
        }
        img{
          display: block;
          margin: 0 auto;
          height: 32px;
          width: 32px;
          border-radius: 2px;
        }
        span{
          display: block;
          width: 100%;
          text-align: center;
          font-size: 12px;
          .single-line-cut;
          color: #464b4b;
        }
      }
    }
    .room-op{
      border-top: 1px solid #dddddd6b;
      padding-top: 12px;
      div{
        margin-bottom: 12px;
        p{
          color: #959a9a;
          margin: 0;
        }
        input.rename-title{
          background-color: transparent;
          width: 90%;
          cursor: pointer;
          &:focus{
            background-color: #fff;
          }
          &::placeholder{
            font-size: 13px;
            color: #abb0b0;
          }
        }
        span.edit-notice{
          cursor: pointer;
        }
        em{
          display: none;
          font-style: normal;
        }
      }
    }
    .out{
      text-align: center;
      color: rgb(244,84,84);
      padding: 20px;
      border-top: 1px solid #dddddd6b;
      cursor: pointer;
    }
  }
}
@chat-bg-color: #9eea6a;
@hover-color:rgb(220,220,220);
#chat{
  @top-color:rgb(190,190,190);//置顶色
  width: 860px;
  height: 640px;
  box-sizing: border-box;
  margin: 26px auto;
  .chat-setting{
    @bg-color:rgb(9,187,7);
    float: left;
    width: 60px;
    height: 640px;
    border: 1px solid #ddd;
    border-right: none;
    border-top-left-radius: 3px;
    border-bottom-left-radius: 3px;
    background-color: rgb(40,40,40);
    & *{
      margin: 20px auto;
      cursor: pointer;
    }
    img.headpic{
      display: block;
      width: 40px;
      height: 40px;
      border-radius: 4px;

    }
    .iconfont{
      display: block;
      color: #959a9a;
      text-align: center;
      font-size: 22px;
    }
    .bg-color{
      color: @bg-color;
    }
  }
  .chat-side {
    float: left;
    height: 640px;
    width: 250px;
    border: 1px solid #ddd;
    border-right: none;
    border-left: none;
    background-color: rgb(236, 234, 232);
    .header {
      height: 60px;
      width: 100%;
      border-bottom: 1px solid #ddd;
      display: flex;
      justify-content: center;
      align-items: flex-end;
      &>*{
        margin-bottom: 6px;
      }
      div.search{
        margin-right: 12px;
      }
      div.add-user{
        height: 26px;
        width: 26px;
        border-radius: 4px;
        background-color: rgba(219,217,216,0.8);
        cursor: pointer;
        text-align: center;
        line-height: 23px;
        &:hover{
          background-color: rgb(209,209,209);
        }
      }
    }
    .chat-list {
      display: block;
      height: 580px;
      width: 100%;
      background-color: rgb(238, 238, 238);
      overflow-Y: scroll;
      overflow-x: hidden;
      .scrollbar(@width: 1px);
      li {
        //position: relative;
        display: flex;
        flex-flow: row nowrap;
        justify-content: space-around;
        height: 60px;
        width: 100%;
        &:hover{
          background-color: @top-color;
          cursor: pointer;
        }
        &.choose{
          background-color: @top-color!important;
        }
        &.top{
          background-color: @hover-color;
        }
        img {
          height: 40px;
          width: 40px;
          border-radius: 4px;
          align-self: center;
          //position: absolute;
          //.position-center(@left: 12px;@right: auto);
        }
        div.info {
          width: 128px;
          display: flex;
          flex-flow: column;
          justify-content: center;
          span.title {
            display: block;
            font-size: 14px;
            font-weight: bold;
            .single-line-cut;
          }
          span.con {
            font-size: 12px;
            color: #959a9a;
            img {
              width: 20px;
              height: 20px;
            }
            .single-line-cut;
          }
        }
        div.time {
          width: 36px;
          color: #959a9a;
          font-size: 12px;
          time {
            display: block;
            margin: 10px auto;
          }
        }
      }
    }
    .user-list{
      display: none;
      height: 580px;
      width: 100%;
      background-color: rgb(238, 238, 238);
      overflow-Y: scroll;
      overflow-x: hidden;
      .scrollbar;
      li.li-list{

      }
      span.letter{
        display: inline-block;
        text-indent: 16px;
        color: #bebebe;
      }
    }
    /*TODO:LIST-OP*/
    ul.chat-list-op{
      position: absolute;
      border-radius: 2px;
      background-color: #fff;
      border: 1px solid rgba(0, 0, 0, .2);
      -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
      box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
      display: none;
      box-sizing: border-box;
      z-index: 999999;
      li {
        display: block;
        width: 100%;
        cursor: pointer;
        padding: 2px 20px;
        &.delete{
          border-top: 1px solid #ddd;
        }
        &:hover {
          background-color: #ddd;
        }
      }
    }
  }
  .chat-bg{
    float: left;
    width: 550px;
    height: 640px;
    border: 1px solid #ddd;
    border-left: none;
    border-radius: 3px;
    img{
      height: 100%;
      width: 100%;
    }
  }
  .chat-wrap {
    display: none;
    float: left;
    width: 550px;
    height: 640px;
    border: 1px solid #ddd;
    border-left: none;
    border-radius: 3px;
    .user-info {
      position: absolute;
      border-radius: 6px;
      background-color: #fff;
      border: 1px solid rgba(0, 0, 0, .2);
      -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
      box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
      padding: 30px;
      width: 300px;
      display: none;
      .img-header {
        height: 60px;
        width: 60px;
        float: left;
        margin-right: 12px;
        border-radius: 4px;
      }
      .count {
        color: #959a9a;
      }
    }
    /*表情*/
    #emotion {
      position: absolute;
      width: 440px;
      height: 280px;
      background-color: #fff;
      border: 1px solid rgba(0, 0, 0, .2);
      box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
      z-index: 99999;
      border-radius: 6px;
      display: none;
      img {
        display: inline-block;
        border: 0;
        padding: 4px 8px;
        &:hover {
          background-color: #ddd;
          cursor: pointer;
        }
      }
    }
    ul.dialoge-op {
      position: absolute;
      border-radius: 2px;
      background-color: #fff;
      border: 1px solid rgba(0, 0, 0, .2);
      -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
      box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
      display: none;
      box-sizing: border-box;
      z-index: 999999;
      li {
        display: block;
        width: 100%;
        cursor: pointer;
        padding: 2px 20px;
        &:hover {
          background-color: #ddd;
        }
      }
    }
    .header {
      height: 60px;
      width: 100%;
      border-bottom: 1px solid #ddd;
      background-color: #f5f5f5;
      .name {
        display: block;
        float: left;
        line-height: 60px;
        margin: 0;
        text-indent: 20px;
        font-weight: normal;
        width: 50%;
      }
      .more{
        display: block;
        float: right;
        margin-top: 30px;
        margin-right: 16px;
        cursor: pointer;
        color: #959a9a;
        &:hover{
          color:#000
        }
      }
    }
    .txt-box {
      position: relative;
      width: 100%;
      height: 112px;
      background-color: #fff;
      overflow: hidden;
      #textarea {
        width: 100%;
        height: 100%;
        border: none;
        resize: none;
        padding-left: 26px;
        font-size: 14px;
        &:focus {
          outline: none;
        }
      }
      .chat-btn{
        position: absolute;
        bottom: 10px;
        right: 20px;
      }
    }
    #nav-box {
      height: 36px;
      width: 100%;
      background: url('../images/chat/nav-bar.png') no-repeat;
      cursor: pointer;
      background-color: #fff;
    }
  }
  .info-box {
    display: block;
    height: 430px;
    width: 100%;
    border-bottom: 1px solid #ddd;
    background-color: rgb(245, 245, 245);
    overflow-Y: scroll;
    overflow-x: hidden;
    margin-bottom: 0;
    .scrollbar;
    .empty-info {
      display: inline-block;
      width: 100%;
      text-align: center;
      color: #ddd;
    }
    div.withDrawal-tip {
      display: block;
      text-align: center;
      font-size: 12px;
      color: #fff;
      height: 16px;
      margin: 10px auto;
      line-height: 13px;
      span {
        display: inline-block;
        background-color: rgb(218, 218, 218);
        padding: 2px 4px;
        border-radius: 1px;
      }
    }
    li.dialogue {
      display: flex;
      justify-content: flex-start;
      width: 92%;
      margin: 20px;
      img.head-pic {
        height: 34px;
        width: 34px;
        border-radius: 2px;
        cursor: pointer;
      }
      em {
        display: block;
        width: 0;
        height: 0;
        margin-top: 8px;
      }
      div.txt {
        display: inline-block;
        font-family: 'Raleway', sans-serif;
        background-color: @chat-bg-color;
        border-radius: 3px;
        padding: 4px;
        max-width: 260px;
        height: auto;
        word-wrap: break-word;
        color: #333;
        line-height: 1.8;
        cursor: pointer;
      }
      span.time {
        display: inline-block;
        background-color: rgb(218, 218, 218);
        text-align: center;
        font-size: 12px;
        color: #fff;
        padding: 2px 4px;
        border-radius: 1px;
        height: 16px;
        margin: auto 10px;
        line-height: 13px;
      }
      &.ans {
        flex-flow: row nowrap;
        em {
          .triangle-row(right, #fff, 6px);
        }
        div {
          background-color: #fff;
          .new-list {
            width: 100%;
            padding-left: 0px;
            li {
              display: flex;
              flex-flow: row nowrap;
              justify-content: flex-start;
              width: 100%;
              margin: 10px 0;
              img {
                display: block;
                float: left;
                width: 120px;
                height: 90px;
              }
              div {
                height: 100%;
                h3 {
                  display: inline-block;
                  font-size: 12px;
                  margin-top: 0;
                }
                span {
                  font-size: 12px;
                  float: right;
                }
              }
            }
          }
        }
      }
      &.ask {
        flex-flow: row-reverse nowrap;
        em {
          .triangle-row(left, @chat-bg-color, 6px);
        }
      }
    }
  }

  #info-tip {
    position: fixed;
    .position-center(@top: 280px;@bottom: auto);
    width: 360px;
    height: 224px;
    background-color: rgb(245,245,245);
    z-index: 99999;
    border: 1px solid rgba(0, 0, 0, .2);
    box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
    border-radius: 6px;
    padding: 4px;
    display: none;
    .title {
      color: #959a9a;
      margin-left: 4px;
    }
    #tip-close {
      position: absolute;
      right: 0;
      top: 0;
      height: 20px;
      width: 28px;
      text-align: center;
      line-height: 20px;
      cursor: pointer;
      &:hover {
        background-color: rgb(244, 84, 84);
      }
    }
    .notice-user-info{
      display: flex;
      flex-flow: row nowrap;
      justify-content: flex-start;
      align-items: center;
      width: 280px;
      margin: 24px auto 0;
      padding: 4px;
      img{
        display: block;
        float: left;
        margin-right: 12px;
        height: 32px;
        width: 32px;
        border-radius: 2px;
      }
      span.info{
        color: #959a9a;
      }
    }
    .con {
      display: block;
      text-align: center;
      color: #000;
      //margin-top: 60px;
      span.tip{
        display: block;
        margin-top: 60px;
      }
      textarea{
        &.rename{
          width: 320px;
          height: 100px;
          border: 1px solid #ddd;
          resize: none;
          padding: 6px;
          box-sizing: border-box;
          margin-top: 28px;
        }
        &.edit-notice{
          width: 280px;
          height: 52px;
          border: none;
          resize: none;
          background-color: transparent;
          padding: 6px;
          box-sizing: border-box;
          overflow-y: scroll;
          .scrollbar();
        }
        &:focus {
          outline: none;
        }
      }
    }
    span.inline-word{
      display: block;
      padding: 0 20px 0;
      margin: 42px auto;
      line-height: 1px;
      border-left: 80px solid #e3e3e3;
      border-right: 80px solid #e3e3e3;
      text-align: center;
      font-size: 8px;
      width: fit-content;
      color: #ddd;
    }
    button{
      position: absolute;
      bottom: 12px;
      &.btn-center{
        .position-center(@bottom: 28px;@top: auto)!important;
      }
      &#confirm{
        right: 90px;
      }
      &#cancel{
        right: 12px;
      }
    }
  }
}

#addUser-wrap {
  display: none;
  position: fixed;
  .position-center();
  width: 550px;
  height: 485px;
  border: 1px solid rgba(0, 0, 0, .2);
  box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
  border-radius: 6px;
  overflow: hidden;
  z-index: 9999;
  background-color: #fff;
  box-sizing: border-box;
  span.close-wrap{
    position: absolute;
    display: block;
    right: 0;
    top: 0;
    width: 32px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    color: #959a9a;
    font-size: 16px;
    &:hover{
      background-color: rgb(244,84,84);
      color: #fff;
      cursor: pointer;
    }

  }
  &>div{
    float: left;
    width: 50%;
    height: 100%;
    &.from-con{
      div.search{
        height: 26px;
        width: 80%;
        margin: 20px auto;
        input{
          width: 100%;
        }
      }
      ul.from-list{
        display: block;
        width: 100%;
        height: 418px;
        &:hover{
          overflow-Y: scroll;
          overflow-x: hidden;
          .scrollbar;
        }
        span.letter{
          display: inline-block;
          text-indent: 16px;
          color: #bebebe;
        }
        div.checkbox{
          width: 275px;
          margin: 0;
          label{
            padding-left: 0;
            width: 275px;
            li.li-list{
              width: 275px;
              margin: 0;
              i.iconfont{
                display: none;
              }
            }
            input{
              .position-center(@right: 20px;@left: auto);
            }
          }
        }
      }
    }
    &.to-con{
      border-left: 1px solid #ddd;
      span.tips{
        display: block;
        height: 26px;
        line-height: 26px;
        color: #bbbbbb;
        margin-top: 20px;
        font-size: 12px;
        text-indent: 14px;
      }
      ul.to-list{
        width: 100%;
        height: 395px;
        overflow-Y: scroll;
        overflow-x: hidden;
        .scrollbar;
        li.li-list{
          position: relative;
          cursor: default;
          i.iconfont{
            position: absolute;
            .position-center(@right: 20px;@left: auto);
            line-height: 60px;
            color: rgba(149,154,154,0.4);
            cursor: pointer;
            &:hover{
              color: #959a9a;
            }
          }
        }
      }
    }
  }
  button{
    &.chat-btn{
      position: absolute;
      bottom: 10px;
    }
    &.chat-btn-green{
      right: 90px;
    }
    &.chat-btn-danger{
      right: 90px;
    }
    &.chat-btn-defult{
      right: 10px;
    }
  }
}
#history {
  position: fixed;
  .position-center(@top: 80px;@bottom: auto);
  width: 550px;
  height: 680px;
  margin: 0 auto !important;
  border: 1px solid rgba(0, 0, 0, .2);
  box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
  border-radius: 6px;
  overflow: hidden;
  z-index: 9999;
  background-color: #fff;
  display: none;
  #his-close {
    position: absolute;
    right: 0;
    top: 0;
    height: 20px;
    width: 26px;
    text-align: center;
    line-height: 24px;
    cursor: pointer;
    border-radius: 3px;

    &:hover {
      background-color: #ddd;
    }
  }
  #his-search {
    display: block;
    margin: 12px auto;
    background-color: #ddd;
    width: 60%;
    height: 26px;
    text-indent: 10px;
    &::placeholder {
      text-align: center;
      color: #959a9a;
    }
  }
  #info-history {
    background-color: #fff;
    height: 628px;
    overflow-Y: scroll;
    overflow-x: hidden;
    .scrollbar;
    ul{
      li.dialogue {
        display: flex;
        border-top: 1px solid #ddd;
        padding: 10px 20px;
        img.head-pic {
          height: 32px !important;
          width: 32px !important;
        }
        div.info {
          width: 100%;
          div.txt {
            max-width: 100% !important;
            color: #000;
            padding: 0 10px;
            line-height: 18px;
            margin-top: 2px;
            font-size: 13px;
          }
          .right-t {
            display: flex;
            flex-flow: row nowrap;
            justify-content: space-between;
            color: #959a9a;
            padding: 0 10px;
            box-sizing: border-box;
            font-size: 12px;
            span.his-name {
              font-size: 12px;
            }
          }
        }
      }
    }
  }
}

button{
  &.chat-btn{
    z-index: 999;
    display: block;
    width: 70px;
    height: 25px;
    line-height: 25px;
    font-size: 12px;
    text-align: center;
    border: none;
  }
  &.chat-btn-green{
    background-color: rgb(26, 173, 25);
    color: #fff;
    &:disabled{
      background-color: rgb(140,213,140);
    }
    &:hover{
      background-color: rgb(18,150,17);
    }
  }
  &.chat-btn-danger{
    background-color: rgb(244, 84, 84);
    color: #fff;
    &:disabled{
      background-color: rgb(248,169,169);
    }
    &:hover{
      background-color: rgb(221,68,68);
    }
  }
  &.chat-btn-defult{
    background-color: #fff;
    color: #959a9a;
    border: 1px solid #ddd;
    &:hover{
      background-color: rgb(239,239,239);
    }
  }
}

.role-label {
  width: 120px;
  margin-left: 0 !important;
}

div#otherPermissions {
  width: 100%;
  margin-top: 10px;
}

div#unread-msg {
  position: fixed;
  width: 50%;
  .position-center(@top: -52px;@bottom: auto);
  z-index: 99999;
}
div.search{
  position: relative;
  border-radius: 4px;
  i.iconfont{
    display: block;
    position: absolute;
    .position-center(@left: 10px;@right: auto);
    line-height: 26px;
    font-weight: bold;
    font-size: 8px;
  }
  input{
    border-radius: 4px;
    border: 1px solid rgba(219,217,216,0.8);
    text-indent: 28px;
    background-color: rgba(219,217,216,0.8);
    height: 26px;
    line-height: 26px;
    &:focus{
      background-color:#fff;
    }
  }

}
li.li-list{
  display: flex;
  flex-flow: row nowrap;
  justify-content: flex-start;
  height: 60px;
  width: 100%;
  margin: 6px 0;
  &.choose{
    background-color: @hover-color;
  }
  &:hover{
    background-color: @hover-color;
    cursor: pointer;
  }
  img {
    height: 40px;
    width: 40px;
    border-radius: 4px;
    align-self: center;
    margin-left: 12px;
  }
  span{
    display: block;
    align-self: center;
    margin-left: 12px;
  }
}